//
//  QDNewsTableHeaderView.h
//  QDMetroClient
//
//  Created by YueWen on 2019/2/18.
//  Copyright © 2019 YueWen. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "QDCarouselItem.h"
#import "RITLSDCycleScrollView.h"

NS_ASSUME_NONNULL_BEGIN

FOUNDATION_EXTERN CGFloat QDNewsTableHeaderViewHeight(void);

@class QDNewsTableHeaderView;
@protocol HeziBannerOpenActivePageDelegate;

@protocol QDNewsTableHeaderViewAction <NSObject>

@optional

/// 进行响应的回调模式
- (void)qdNewsTableHeaderView:(QDNewsTableHeaderView *)headerView bannerAtIndex:(NSInteger)index;

@end

/// 资讯控制器的顶部轮播图
@interface QDNewsTableHeaderView : UIView

/// 响应者
@property (nonatomic, weak, nullable)id <QDNewsTableHeaderViewAction> actor;
/// 盒子的代理
@property (nonatomic, weak, nullable)id <HeziBannerOpenActivePageDelegate> heziDelegate;

/// 轮播视图
@property (nonatomic, strong) RITLSDCycleScrollView *cycleView;

/// 更新数据，轮播
- (void)updateWithItems:(__kindof NSArray <QDCarouselItem *> *)carouses
               complete:(nullable void(^)(QDNewsTableHeaderView *view))complete;

@end

NS_ASSUME_NONNULL_END
